home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™ 1987-1994 / MacHack™ '90 / MacHack 90 Contest Entries / Surovell Stuffƒ / GDResToggle.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-06-05  |  386 b   |  24 lines  |  [TEXT/KAHL]

  1.  
  2. /* #include <MacHeaders> */
  3. #include <Color.h>
  4.  
  5. #define NULL        0L
  6.  
  7. pascal void GDeviceChanged(
  8.     GDHandle    gdh )
  9. = { 0x203C, 0x000A, 0x0007, 0xAB1D };
  10.  
  11.  
  12. main()
  13. {
  14. GDHandle    curDevHdl, mainDevHdl;
  15. short        curRes, newRes;
  16.  
  17.     mainDevHdl = GetMainDevice();
  18.     curRes = (**mainDevHdl).gdResPref;
  19.     newRes = (curRes == 4) ? 5 : 4;
  20.     (**mainDevHdl).gdResPref = newRes;
  21.     GDeviceChanged( mainDevHdl );
  22. }
  23.  
  24.